﻿@use "../../wwwroot/scss/variables" as *;

.groupbox {
    --bb-groupbox-padding: #{$bb-groupbox-padding};
    --bb-groupbox-margin-top: #{$bb-groupbox-margin-top};
    --bb-groupbox-legend-padding: #{$bb-groupbox-legend-padding};
    --bb-groupbox-legend-left: #{$bb-groupbox-legend-left};
    --bb-groupbox-legend-top: #{$bb-groupbox-legend-top};
    border: 1px solid var(--bs-border-color);
    padding: var(--bb-groupbox-padding);
    border-radius: var(--bs-border-radius);
    position: relative;
    margin-block-start: var(--bb-groupbox-margin-top);

    .legend {
        background-color: var(--bs-body-bg);
        padding: var(--bb-groupbox-legend-padding);
        position: absolute;
        left: var(--bb-groupbox-legend-left);
        top: var(--bb-groupbox-legend-top);
    }
}

.form-body {
    > .groupbox:not(:last-child) {
        margin-block-end: 1rem;
        margin-block-start: 0;
    }

    > .row {
        + .groupbox {
            margin-block-start: 1rem;
        }
    }
}
